package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.Order;
import com.antdesignbackend.backend.entity.entityVo.OrderVo;
import com.antdesignbackend.backend.mapper.OrderMapper;
import com.antdesignbackend.backend.service.OrderService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
    @Autowired
    OrderMapper orderMapper;
    public List<OrderVo> search(@Param(Constants.WRAPPER) QueryWrapper<OrderVo> orderVoQueryWrapper, Page<OrderVo> orderVoPage){
        return orderMapper.search(orderVoQueryWrapper,orderVoPage);
    };
    public Integer count(@Param(Constants.WRAPPER) QueryWrapper<OrderVo> orderVoQueryWrapper){
        return orderMapper.count(orderVoQueryWrapper);
    };
}
